import pandas as pd

# pandas显示所有行
pd.set_option('display.max_rows', None)
# 设置pandas显示的列数
pd.set_option('display.max_columns', 20)
# 让dataframe打印不换行
pd.set_option('display.width', 5000)

zipSpace = pd.read_csv('data/zipCar/Carshare.csv')
print(zipSpace.head())
cs_spaces = zipSpace['CS_Spaces'].sum()
print(cs_spaces)
print(zipSpace.shape)
print(zipSpace['CS_Spaces'].tolist())

zipCar = pd.read_csv('data/zipCar/zip.csv')
print(zipCar.head())
print(zipCar.shape)
zip_count = zipCar['vehicleCount'].sum()
print(zip_count)
print('zip',zipCar['vehicleCount'].tolist())

zip2Car = pd.read_csv('data/zipCar/zip2.csv')
print('zip2',zip2Car['vehicleCount'].tolist())
print("zip2 car count:",zip2Car['vehicleCount'].sum())

zip3Car = pd.read_csv('data/zipCar/zip3.csv')
print("zip3 car count:",zip3Car['vehicleCount'].sum())
print('zip3',zip3Car['vehicleCount'].tolist())

print(zip3Car['vehicleCount'].tolist()==zip2Car['vehicleCount'].tolist())

zip4Car = pd.read_csv('data/zipCar/zip4.csv')
print('zip4',zip4Car['vehicleCount'].tolist())
print("zip4 car count:",zip4Car['vehicleCount'].sum())
print(zip3Car['vehicleCount'].tolist()==zip4Car['vehicleCount'].tolist())

zip5Car = pd.read_csv('data/zipCar/zip20220428.csv')
print('zip5',zip4Car['vehicleCount'].tolist())
print("zip5 car count:",zip5Car['vehicleCount'].sum())
print(zip3Car['vehicleCount'].tolist()==zip5Car['vehicleCount'].tolist())

zip6Car = pd.read_csv('data/zipCar/zipcar_site.csv')
print('zip6',zip4Car['vehicleCount'].tolist())
print("zip6 car count:",zip6Car['vehicleCount'].sum())
print(zip3Car['vehicleCount'].tolist()==zip6Car['vehicleCount'].tolist())
print('zip6 site size:',zip6Car.shape)